/**
*
* @author
*
*/
class OpPageFire extends OpPage {

    private _btnSprite: egret.Bitmap;
    private _touchEnabled: Boolean = false;

    public constructor() {
        super();

        this._btnSprite = new egret.Bitmap();
        this._btnSprite.texture = RES.getRes('page/fire-btn.png');
        this._btnSprite.width = 402;
        this._btnSprite.height = 132;
        this._btnSprite.x = 399;
        this._btnSprite.y = 550;
        this.addChild(this._btnSprite);
    }

    public enableTouch(): void {
        this._touchEnabled = true;
    }

    public oneTouch(event: egret.TouchEvent): void {
        if(event.stageX > 399 && event.stageX < 801 &&
            event.stageY > 550 && event.stageY < 682) {
            if(this._touchEnabled) {
                this._touchEnabled = false;
                EventBus.trigger('OP_FIRE_FIRST');
            }
        }
    }
}